package com.yuw.objectdemo;

public class TestDriver {

	public static void main(String[] args) {
		test02();
	}

	/**
	 * 自定义类重写equals方法
	 */
	private static void test02() {
		// 创建一个Student对象
		Student stu0 = new Student("张三", "15001", 89);
		Student stu1 = new Student("张三", "15001", 89);
		
		System.out.println("stu0 == stu1:" + (stu0 == stu1));
		System.out.println("stu0.equals(stu1):" + (stu0.equals(stu1)));
	}
	/**
	 * 自定义类重写toString方法
	 */
	private static void test01() {
		// 创建一个Student对象
		Student stu0 = new Student("张三", "15001", 89);
		System.out.println("学生信息：" + stu0.toString());
	}

}
